<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Class: ActionController::RequestProfiler::Sandbox</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Class</strong></td>
          <td class="class-name-in-header">ActionController::RequestProfiler::Sandbox</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../../../files/vendor/rails/actionpack/lib/action_controller/request_profiler_rb.html">
                vendor/rails/actionpack/lib/action_controller/request_profiler.rb
                </a>
        <br />
            </td>
        </tr>

        <tr class="top-aligned-row">
            <td><strong>Parent:</strong></td>
            <td>
                <a href="../../Object.html">
                Object
               </a>
            </td>
        </tr>
        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">

    <div id="description">
      <p>
Wrap up the integration session runner.
</p>

    </div>


   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M001029">benchmark</a>&nbsp;&nbsp;
      <a href="#M001031">benchmark</a>&nbsp;&nbsp;
      <a href="#M001030">new</a>&nbsp;&nbsp;
      <a href="#M001032">say</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->
    <div id="includes">
      <h3 class="section-bar">Included Modules</h3>

      <div id="includes-list">
        <span class="include-name"><a href="../Integration/Runner.html">Integration::Runner</a></span>
      </div>
    </div>

    <div id="section">





      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Class methods</h3>

      <div id="method-M001029" class="method-detail">
        <a name="M001029"></a>

        <div class="method-heading">
          <a href="#M001029" class="method-signature">
          <span class="method-name">benchmark</span><span class="method-args">(n, script)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001029-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001029-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/request_profiler.rb, line 10</span>
10:       <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">benchmark</span>(<span class="ruby-identifier">n</span>, <span class="ruby-identifier">script</span>)
11:         <span class="ruby-identifier">new</span>(<span class="ruby-identifier">script</span>).<span class="ruby-identifier">benchmark</span>(<span class="ruby-identifier">n</span>)
12:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M001030" class="method-detail">
        <a name="M001030"></a>

        <div class="method-heading">
          <a href="#M001030" class="method-signature">
          <span class="method-name">new</span><span class="method-args">(script_path)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001030-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001030-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/request_profiler.rb, line 14</span>
14:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">script_path</span>)
15:         <span class="ruby-ivar">@quiet</span> = <span class="ruby-keyword kw">false</span>
16:         <span class="ruby-identifier">define_run_method</span>(<span class="ruby-identifier">script_path</span>)
17:         <span class="ruby-identifier">reset!</span>
18:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M001031" class="method-detail">
        <a name="M001031"></a>

        <div class="method-heading">
          <a href="#M001031" class="method-signature">
          <span class="method-name">benchmark</span><span class="method-args">(n, profiling = false)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001031-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001031-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/request_profiler.rb, line 20</span>
20:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">benchmark</span>(<span class="ruby-identifier">n</span>, <span class="ruby-identifier">profiling</span> = <span class="ruby-keyword kw">false</span>)
21:         <span class="ruby-ivar">@quiet</span> = <span class="ruby-keyword kw">true</span>
22:         <span class="ruby-identifier">print</span> <span class="ruby-value str">'  '</span>
23: 
24:         <span class="ruby-identifier">result</span> = <span class="ruby-constant">Benchmark</span>.<span class="ruby-identifier">realtime</span> <span class="ruby-keyword kw">do</span>
25:           <span class="ruby-identifier">n</span>.<span class="ruby-identifier">times</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
26:             <span class="ruby-identifier">run</span>(<span class="ruby-identifier">profiling</span>)
27:             <span class="ruby-identifier">print_progress</span>(<span class="ruby-identifier">i</span>)
28:           <span class="ruby-keyword kw">end</span>
29:         <span class="ruby-keyword kw">end</span>
30: 
31:         <span class="ruby-identifier">puts</span>
32:         <span class="ruby-identifier">result</span>
33:       <span class="ruby-keyword kw">ensure</span>
34:         <span class="ruby-ivar">@quiet</span> = <span class="ruby-keyword kw">false</span>
35:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M001032" class="method-detail">
        <a name="M001032"></a>

        <div class="method-heading">
          <a href="#M001032" class="method-signature">
          <span class="method-name">say</span><span class="method-args">(message)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001032-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001032-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/request_profiler.rb, line 37</span>
37:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">say</span>(<span class="ruby-identifier">message</span>)
38:         <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;  #{message}&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@quiet</span>
39:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>